/********************************************************************************/
/* This code is to replicate the Tables and Figures of the "Implicit promises	*/ 
/* and the timing of defined benefit pension plan freezes". 					*/
/* 																				*/
/* Please note that we are providing a pseudo-data set because of data 			*/
/* restriction due to confidentiality agreements.								*/
/********************************************************************************/

cd "C:\Users\Zacharias\Documents\My Research Papers\Paper_me_adamo_2_PensionFreeze\_Submissions\9_Financial_Management\RR_2\STATA_Code\Final_clean"

use fmfile_final,clear

/****************************************************************************/
/*                	FIGURES 1 TO 3 - SAMPLE DESCRIPTION						*/
/****************************************************************************/

*FIGURE 1
tabstat Pension_freeze if yeardiff==0,statistics(sum) by(Freeze_year)

*FIGURE 2
tabstat Pension_freeze if yeardiff==0,by(sich1) stats(sum)

*FIGURE 3
tabstat  CEO_turn CEO_voluntary_turn CEO_forced_turn ,statistics(sum) by(yeardiff)


/****************************************************************************/
/*						TABLE 1 - SUMMARY STATISTICS						*/
/****************************************************************************/

*CONTROL SAMPLE
estpost tabstat Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag Assets_lag CEO_Chair_lag Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag  CEO_Age_depart CEO_tenure_depart if ((CEO_change==0)), statistics(count mean sd median) columns(statistics) 

*VOLUNTARY TURNOVERS
estpost tabstat Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag Assets_lag CEO_Chair_lag Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag  CEO_Age_depart CEO_tenure_depart if (CEO_voluntary_turn==1), statistics(count mean sd median) columns(statistics)

*FORCED TURNOVERS
estpost tabstat Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag Assets_lag CEO_Chair_lag Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag  CEO_Age_depart CEO_tenure_depart if (CEO_forced_turn==1), statistics(count mean sd median) columns(statistics)
 
/****************************************************************************/
/*					TABLE 2 - BASELINE REGRESSIONS 							*/
/****************************************************************************/

************************** TOTAL TURNOVERS ***********************************
*YEAR FE
reghdfe CEO_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_turn==1))),cluster(firmid) absorb(fyear)

*YEAR INDUSTRY FE
reghdfe CEO_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_turn==1))),cluster(firmid) absorb(sich2 fyear)

*YEAR FIRM FE
reghdfe CEO_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_turn==1))),cluster(firmid) absorb(firmid fyear)


************************** VOLUNTARY TURNOVERS *******************************
*YEAR FE
reghdfe CEO_voluntary_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

*YEAR INDUSTRY FE
reghdfe CEO_voluntary_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(sich2 fyear)

*YEAR FIRM FE
reghdfe CEO_voluntary_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(firmid fyear)


************************** FORCED TURNOVERS **********************************
*YEAR FE
reghdfe CEO_forced_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_forced_turn==1))),cluster(firmid) absorb(fyear)

*YEAR INDUSTRY FE
reghdfe CEO_forced_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_forced_turn==1))),cluster(firmid) absorb(sich2 fyear)

*YEAR FIRM FE
reghdfe CEO_forced_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_forced_turn==1))),cluster(firmid) absorb(firmid fyear)
 

/****************************************************************************/
/*						FIGURE 4 - BASELINE REGRESSIONS						*/
/****************************************************************************/

*FIGURE 4A: Total CEO turnovers around the freeze
reghdfe CEO_turn prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5 ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag  Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_turn==1))),cluster(firmid) absorb(fyear)
 
coefplot,keep(prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5) vertical mcolor(black) ciopts(lcolor(black) recast(rcap)) ///
rename(prefreeze4="-4" prefreeze3="-3" prefreeze2="-2" prefreeze1="-1"  prefreeze0="0" postfreeze1="1" postfreeze2="2" postfreeze3="3" postfreeze4="4" postfreeze5="5") ///
yline(0,lcolor(black) lpattern(dash)) graphregion(fcolor(white) ifcolor(white) ilcolor(white)) xscale(lcolor(black)) yscale(lcolor(black)) ///
xlabel(, labcolor(black) noticks) ylabel(, labcolor(black) noticks ) title(Total CEO turnovers around the freeze, color(black))


*FIGURE 4B: Voluntary CEO turnovers around the freeze
reghdfe CEO_voluntary_turn prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5 ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag  Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)
 
coefplot,keep(prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5) vertical mcolor(black) ciopts(lcolor(black) recast(rcap)) ///
rename(prefreeze4="-4" prefreeze3="-3" prefreeze2="-2" prefreeze1="-1"  prefreeze0="0" postfreeze1="1" postfreeze2="2" postfreeze3="3" postfreeze4="4" postfreeze5="5") ///
yline(0,lcolor(black) lpattern(dash)) graphregion(fcolor(white) ifcolor(white) ilcolor(white)) xscale(lcolor(black)) yscale(lcolor(black)) ///
xlabel(, labcolor(black) noticks) ylabel(, labcolor(black) noticks ) title(Voluntary CEO turnovers around the freeze, color(black))


*FIGURE 4C: Forced CEO turnovers around the freeze
reghdfe CEO_forced_turn prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5 ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag  Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_forced_turn==1))),cluster(firmid) absorb(fyear)
 
coefplot,keep(prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5) vertical mcolor(black) ciopts(lcolor(black) recast(rcap)) ///
rename(prefreeze4="-4" prefreeze3="-3" prefreeze2="-2" prefreeze1="-1"  prefreeze0="0" postfreeze1="1" postfreeze2="2" postfreeze3="3" postfreeze4="4" postfreeze5="5") ///
yline(0,lcolor(black) lpattern(dash)) graphregion(fcolor(white) ifcolor(white) ilcolor(white)) xscale(lcolor(black)) yscale(lcolor(black)) ///
xlabel(, labcolor(black) noticks) ylabel(, labcolor(black) noticks ) title(Forced CEO turnovers around the freeze, color(black))


/****************************************************************************/
/*						TABLE 3 - ALTERNATIVE EXPLANATIONS 					*/
/****************************************************************************/

********************* TABLE 3 PANEL A - PLANNED TURNOVERS ********************
 
*PENSION START AGE
reghdfe CEO_voluntary_turn prefreeze1##Pension_start_age Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag ///
Leverage_lag ln_Assets_lag  CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

*AGE65+
reghdfe CEO_voluntary_turn prefreeze1##Age65_plus Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag ///
Leverage_lag ln_Assets_lag  CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

*ALL 
reghdfe CEO_voluntary_turn prefreeze1##Pension_start_age prefreeze1##Age65_plus Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag ///
Leverage_lag ln_Assets_lag  CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

  
***************** TABLE 3 PANEL B - SEVERITY OF PENSION FREEZES *************

*SERP FREEZE
reghdfe CEO_voluntary_turn prefreeze1##SERP_freeze ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

*CASH BALANCE PLAN
reghdfe CEO_voluntary_turn prefreeze1##Cash_balance_plan ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

*YEARS TO RETIREMENT
reghdfe CEO_voluntary_turn prefreeze1##c.Years_to_retirement ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

*ALL
reghdfe CEO_voluntary_turn prefreeze1##SERP_freeze prefreeze1##Cash_balance_plan prefreeze1##c.Years_to_retirement ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)


/****************************************************************************/
/*				TABLE 4 - RETENTION AND REPUTATION CONCERNS					*/
/****************************************************************************/
 
* MANY OUTSIDE CEO HIRINGS
reghdfe CEO_voluntary_turn prefreeze1##Many_outside_CEOs ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

* DIVERSIFIED (WHERE DIVERSIFIED=1-HHISEG1W)
reghdfe CEO_voluntary_turn prefreeze1##c.Diversified ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

* UNEMPLOYMENT RATE
reghdfe CEO_voluntary_turn prefreeze1##c.Unemployment_rate ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

* CEO POWER
reghdfe CEO_voluntary_turn prefreeze1##CEO_power ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

* ALL
reghdfe CEO_voluntary_turn prefreeze1##Many_outside_CEOs prefreeze1##c.Diversified prefreeze1##c.Unemployment_rate prefreeze1##CEO_power ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)
 
  
/*******************************************************************/
/* SECTION 6.2: ALTERNATIVE STRATEGIES-CHANGES IN PENSION BENEFITS */
/* TABLE OA1 													   */
/*******************************************************************/
    
* PENSION CHANGE
reghdfe CEO_voluntary_turn prefreeze1##c.Pension_Change ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

* PENSION CHANGE ADJUSTED
reghdfe CEO_voluntary_turn prefreeze1##c.Pension_Change_Adjusted ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

* EXCESS PENSION CHANGE
reghdfe CEO_voluntary_turn prefreeze1##c.Excess_Pension_Change ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_voluntary_turn==1))),cluster(firmid) absorb(fyear)

  
/************************************************************************************/
/* SECTION 6.3: FURTHER EVIDENCE FROM OTHER EXECUTIVES AND RANK-AND-FILE EMPLOYEES	*/
/* TABLE OA2 AND FIGURE 5 															*/
/************************************************************************************/

************* TABLE 0A2 COLUMN 1 - CEO TURNOVERS ******************************* 
reghdfe CEO_turn prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 Post_freeze ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ///
if (((CEO_change==0|CEO_turn==1))),cluster(firmid) absorb(fyear)


/*############################################################################*/
/*NOTE: FOR OTHER TOP EXECUTIVES WE ARE USING DATASET EXECTUVESTURN THAT 	  */ 	
/*		INCLUDE DATA ON OTHER EXECUTIVE TURNOVERS FROM EXECUCOMP 			  */
/*############################################################################*/

use fmfile_otherexecs,clear

************* TABLE 0A2 COLUMN 2 - OTHER TOP EXECUTIVES ************************
reghdfe Top_executive_turnover prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 Post_freeze ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart Top_exec_age Top_exec_is_director ///
,cluster(firmid) absorb(fyear)


************* FIGURE 5A - OTHER TOP EXECUTIVES *********************************
reghdfe Top_executive_turnover prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5 ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag ///
perc_NE_Directors_lag perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart Top_exec_age Top_exec_is_director ///
,cluster(firmid) absorb(fyear)

coefplot,keep( prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5) vertical mcolor(black) ciopts(lcolor(black) recast(rcap)) ///
rename(prefreeze4="-4" prefreeze3="-3" prefreeze2="-2" prefreeze1="-1"  prefreeze0="0" postfreeze1="1" postfreeze2="2" postfreeze3="3" postfreeze4="4" postfreeze5="5") ///
yline(0,lcolor(black) lpattern(dash)) graphregion(fcolor(white) ifcolor(white) ilcolor(white)) xscale(lcolor(black)) yscale(lcolor(black)) ///
xlabel(, labcolor(black) noticks) ylabel(, labcolor(black) noticks ) title(Other top executive turnovers around the freeze, color(black))

/*############################################################################*/
/* 							END: OTHER TOP EXECUTIVES					      */
/*############################################################################*/


************* TABLE OA2 COLUMN 3 - RANK-AND-FILE EMPLOYEES  ********************
use fmfile_final,clear

reghdfe Rank_and_file_sepr prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 Post_freeze ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ln_total_participation ///
,cluster(firmid) absorb(fyear)

************* FIGURE 5B - RANK-AND-FILE EMPLOYEES ******************************
reghdfe Rank_and_file_sepr prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0  postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5 ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag ///
perc_insiders_ownership_lag perc_institutional_ownership_lag CEO_Age_depart CEO_tenure_depart ln_total_participation ///
,cluster(firmid) absorb(fyear)
 
coefplot,keep( prefreeze4 prefreeze3 prefreeze2 prefreeze1 prefreeze0 postfreeze1 postfreeze2 postfreeze3 postfreeze4 postfreeze5) vertical mcolor(black) ciopts(lcolor(black) recast(rcap)) ///
rename(prefreeze4="-4" prefreeze3="-3" prefreeze2="-2" prefreeze1="-1"  prefreeze0="0" postfreeze1="1" postfreeze2="2" postfreeze3="3" postfreeze4="4" postfreeze5="5") ///
yline(0,lcolor(black) lpattern(dash)) graphregion(fcolor(white) ifcolor(white) ilcolor(white)) xscale(lcolor(black)) yscale(lcolor(black)) ///
xlabel(, labcolor(black) noticks) ylabel(, labcolor(black) noticks ) title(Rank-and-file separations around the freeze, color(black))


/****************************************************************************/
/* SECTION 7: ROBUSTNESS												    */
/* TABLE 6 - MATCHING APPROACH									  			*/
/****************************************************************************/

/****************************************************************************/
/*					TABLE 6 - PANEL A: PSM									*/
/****************************************************************************/

use fmfile_psmsample,clear 

xtset firmid fyear

*************************** TOTAL TURNOVERS ***********************************
* YEAR FE
reghdfe CEO_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
,cluster(pairmatchid) absorb(fyear)
 
* YEAR INDUSTRY FE
reghdfe CEO_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
,cluster(pairmatchid) absorb(sich2 fyear)

* YEAR FIRM FE
reghdfe CEO_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
,cluster(pairmatchid) absorb(firmid fyear)
  
*************************** VOLUNTARY TURNOVERS *******************************
* YEAR FE
reghdfe CEO_voluntary_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
if (CEO_turn==0|CEO_voluntary_turn==1),cluster(pairmatchid) absorb(fyear)

* YEAR INDUSTRY FE
reghdfe CEO_voluntary_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
if (CEO_turn==0|CEO_voluntary_turn==1),cluster(pairmatchid) absorb(sich2 fyear)

* YEAR FIRM FE
reghdfe CEO_voluntary_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
if (CEO_turn==0|CEO_voluntary_turn==1),cluster(pairmatchid) absorb(firmid fyear)
 
*************************** FORCED TURNOVERS **********************************
* YEAR FE
reghdfe CEO_forced_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
if (CEO_turn==0|CEO_forced_turn==1),cluster(pairmatchid) absorb(fyear)
 
* YEAR INDUSTRY FE
reghdfe CEO_forced_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
if (CEO_turn==0|CEO_forced_turn==1),cluster(pairmatchid) absorb(sich2 fyear)

* YEAR FIRM FE
reghdfe CEO_forced_turn  prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  ///
if (CEO_turn==0|CEO_forced_turn==1),cluster(pairmatchid) absorb(firmid fyear) 


/****************************************************************************/
/*					TABLE 6 - PANEL B: ENTROPY BALANCING					*/
/****************************************************************************/

use fmfile_entropy,clear
 
ebalance Pension_freeze ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag  perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart ///
Funding_ratio_lag Relative_pension_size_lag Industry_union_rate_lag, targets(2)

************************** TOTAL TURNOVERS ***********************************
*YEAR FE
reghdfe CEO_turn prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(fyear)

*YEAR INDUSTRY FE
 reghdfe CEO_turn prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(sich2 fyear)

*YEAR FIRM FE
reghdfe CEO_turn prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(firmid fyear)

************************** VOLUNTARY TURNOVERS *******************************
*YEAR FE
reghdfe CEO_voluntary_turn prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(fyear)

*YEAR INDUSTRY FE
reghdfe CEO_voluntary_turn prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(sich2 fyear)

*YEAR FIRM FE
reghdfe CEO_voluntary_turn prefreeze1  Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(firmid fyear)

************************** FORCED TURNOVERS **********************************

*YEAR FE
reghdfe CEO_forced_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(fyear)

*YEAR INDUSTRY FE
reghdfe CEO_forced_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(sich2 fyear)

*YEAR FIRM FE
reghdfe CEO_forced_turn  prefreeze1 Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart  [pweight=_webal] ///
,cluster(firmid) absorb(firmid fyear)


/****************************************************************************/
/*                TABLE OA3 PANEL A - PROBIT REGRESSION                     */
/****************************************************************************/

use fmfile_probit,clear

probit post_DB_freeze ///
Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag  perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart ///
Funding_ratio_lag Underfund_lag Relative_pension_size_lag Industry_union_rate_lag i.fyear , asis

lroc,nograph

 
/****************************************************************************/
/*                TABLE OA3 PANEL B - IMBALANCE METRICS                     */
/****************************************************************************/

use fmfile_psmsample,clear

pstest Excess_Return Excess_Return_lag Std_returns_lag Sales_growth_lag R_and_D_lag Market_to_Book_lag Leverage_lag ln_Assets_lag ///
CEO_Chair_lag ln_Board_Size_lag perc_NE_Directors_lag perc_insiders_lag perc_institutional_lag CEO_Age_depart CEO_tenure_depart ///
Funding_ratio_lag Underfund_lag Relative_pension_size_lag Industry_union_rate_lag if yeardiff==0,treated(Pension_freeze) rubin 



 
 
 